home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Weird perl-C interaction (rand)
- Date: Sun, 21 Jan 96 20:14:41 GMT
- Organization: none
- Distribution: world
- Message-ID: <822255281snz@genesis.demon.co.uk>
- References: <4djfjg$l45@decaxp.harvard.edu> <4djt5i$fjn@reznor.larc.nasa.gov>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4djt5i$fjn@reznor.larc.nasa.gov>
- hook@cscsun3.larc.nasa.gov "Ed Hook" writes:
-
- > It looks like you've uncovered a serious problem -- I modified 'frotz'
- > so that it dumps out the first 10 values returned by 'random()', along
- > with their reductions mod 32768. It appears that, regardless of the
- > seed value, the reductions are always the *same* sequence; here are three
- > examples:
- >
- >seed = 1184563200 :
-
- ...
-
- >seed = 434831360 :
-
- ...
-
- >seed = 987693056 :
-
- > Any other comments ?
-
- Have you noticed that your seeds are all exact multiples of 65536? Even
- so your results do imply that the lower bits of the series are not affected
- by the higher bits which does cast doubts on AIX's claims.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-